#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);


    w.setIcon(":/2.jpg");
    A = new EffectWidgetAnimation(&w);
    A->addButton(new QPushButton("1"));
    A->addButton(new QPushButton("2"));
    A->addButton(new QPushButton("3"));
    A->addButton(new QPushButton("4"));
    A->addButton(new QPushButton("5"));
    A->animationStart(ANIMATION::IN);
    w.setBorderWidth(4);
    w.show();


    A->setDirtion(RIGHT_BORDER);


    QObject::connect(&button, SIGNAL(clicked()),A, SLOT(animationStart()));

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
    int rel = ui->lineEdit->text().toUInt();
    A->setGap(rel);
}

void MainWindow::on_pushButton_2_clicked()
{
    A->animationStart(IN);
}

void MainWindow::on_pushButton_3_clicked()
{
    A->removeButton("1");
}

void MainWindow::on_pushButton_4_clicked()
{
    A->setDirtion(LEFT_BORDER);
}

void MainWindow::on_pushButton_5_clicked()
{
    A->setDirtion(RIGHT_BORDER);
}
